﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using HengTong.Model.Db.Hr;

namespace HengTong.Model.Db.Hr.Bill;

/// <summary>
/// 换班申请
/// </summary>
[Display(Name = "换班申请", Description = "员工换班申请表单", GroupName = "日常业务表单")]
public class SysDailyShiftSwapRequestBill : BaseBill
{
    [Required]
    [Display(Name = "申请人ID", Description = "申请人主键", GroupName = "员工信息")]
    public Guid? PersonId { get; set; }

    [Display(Name = "申请人", Description = "申请人员工实体", GroupName = "员工信息")]
    public SysPerson Person { get; set; }

    [Required, StringLength(128)]
    [Display(Name = "员工工号", Description = "员工工号", GroupName = "换班申请信息")]
    public string StaffNo { get; set; }

    [Required, StringLength(128)]
    [Display(Name = "员工姓名", Description = "员工姓名", GroupName = "换班申请信息")]
    public string Name { get; set; }

    [Required]
    [Display(Name = "开始时间", Description = "换班开始时间(通常为当天)", GroupName = "换班申请信息")]
    public DateTime? StartTime { get; set; }
    
    [Display(Name = "结束时间", Description = "换班结束时间(通常为当天)", GroupName = "换班申请信息")]
    public DateTime? EndTime { get; set; }

    [Required, StringLength(256)]
    [Display(Name = "事由", Description = "事由", GroupName = "换班申请信息")]
    public string Reason { get; set; }

    [Required]
    [Display(Name = "换班关联记录ID", Description = "对方当日排班记录ID(SysAttendanceRecord.ID)", GroupName = "换班申请信息")]
    public Guid? SwapShiftId { get; set; }

    [Display(Name = "换班对方人员ID", Description = "对方人员主键(可选)", GroupName = "换班申请信息")]
    public Guid? SwapPersonId { get; set; }

    [Display(Name = "换班对方人员", Description = "对方人员实体(可选)", GroupName = "换班申请信息")]
    public SysPerson SwapPerson { get; set; }

    [StringLength(128)]
    [Display(Name = "换班对方工号", Description = "换班对方工号", GroupName = "换班申请信息")]
    public string SwapStaffNo { get; set; }

    [StringLength(128)]
    [Display(Name = "换班对方姓名", Description = "换班对方姓名", GroupName = "换班申请信息")]
    public string SwapName { get; set; }
}